package com.example.activemqsub.subscribe;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

/**
 * \* @author: wky
 * \* Date: 2022/10/08
 * \* Time: 15:22
 * \* To change this template use File | Settings | File Templates.
 * \* Description:Subscribe
 * \
 */
@Component
public class Subscribe {

    @JmsListener(destination = "mytopic")
    public void receiveMsg(String msg) {
        System.out.println("收到的消息<msg:" + msg + ">");
    }
}